﻿using System;

namespace Xin478.MySocket
{
    public interface IServer
    {
        event NetEventHandler OnClientConnectEvent;
        event NetEventHandler OnClientCloseEvent;
        event NetEventHandler OnServerFullEvent;
        event NetEventHandler OnReceivedDatagramEvent;

        IDatagramAnalyze DatagramAnalyze { get; set; }
        int Capacity { get; }
        int ClientCount { get; }
        bool IsRun { get; }

        void Start();
        void Stop();
        void CloseAllClient();
        void CloseSession(Session closeClient);
        void Send(Session recvDataClient, byte[] datagram);
    }
}
